<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%weixin}}".
 *
 * @property integer $id
 * @property string $code
 * @property string $gzh_id
 * @property string $gzh_img
 * @property string $createat
 */
class Weixin extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%weixin}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['code', 'gzh_id'], 'required'],
            [['createat'], 'safe'],
            [['code', 'gzh_id'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => '验证码',
            'gzh_id' => '公众号ID',
            'gzh_img' => '公众号二维码',
            'createat' => 'Createat',
        ];
    }

    /**
     * @inheritdoc
     * @return WeixinQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new WeixinQuery(get_called_class());
    }
}
